
if (typeof window["DWRUtil"] == "undefined") {
	window.DWRUtil = dwr.util;
}
var SV, SUBV;
function defV(prm0, prm1) {
	SV = prm0;
	SUBV = prm1;
	if (SV == null || SV == "undefined" || SUBV == null || SUBV == "undefined") {
		dictdwr.defselect(function (data) {
			SV = data.split(",")[0];
			SUBV = data.split(",")[1];
		});
	}
	dictdwr.select(function (data) {
		DWRUtil.removeAllOptions;
		DWRUtil.addOptions("select", data);
		selectItemByValue(document.getElementById("select"), SV);
		toSubSelect(SV);
	});
}
function selectItemByValue(objSelect, defv) {
	for (var i = 0; i < objSelect.options.length; i++) {
		if (objSelect.options[i].value == defv) {
			objSelect.options[i].selected = true;
			break;
		}
	}
}
function toSubSelect(type) {
        //alert(type);
        //alert(SUBV);
	    //alert($("subSelect").value + " " + $("select").value);
	    dictdwr.subSelect(type, function (data) {
		//var list = data.split(",");
		DWRUtil.removeAllOptions("subSelect");
		DWRUtil.addOptions("subSelect", data);
		selectItemByValue(document.getElementById("subSelect"), SUBV);
	});
}

